package com.ikun.admin.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 菜单权限
 * </p>
 *
 * @author ${author}
 * @since 2024-04-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_menu")
@ApiModel(value = "Menu对象", description = "菜单权限 ")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "父级菜单 (第一级菜单pid为0)")
    private Long pid;

    @ApiModelProperty(value = "菜单名")
    private String title;

    @ApiModelProperty(value = "路由")
    private String router;

    @ApiModelProperty(value = "权限 (多个权限用英文分号隔开)")
    private String perm;

    @ApiModelProperty(value = "类型 (0表示菜单 1表示权限(按钮))")
    private Integer type;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "是否为开发菜单 默认1 否 0是")
    private Integer ifDev;

    @ApiModelProperty(value = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private Long creator;

    @ApiModelProperty(value = "更新人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updater;

    @ApiModelProperty(value = "创建时间 now()")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间 now()")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "逻辑删除 (默认0 未删除 1删除)")
    private Integer deleted;


}
